import { defineComponent, toRefs } from 'vue'
import { StatusProps, statusProps } from './status-types'
import { useNamespace } from '../shared/hooks/useNamespace'

export default defineComponent({
  name: 'FsStatus',
  props: statusProps,
  setup(props: StatusProps, ctx) {
    const { type } = toRefs(props)
    const ns = useNamespace('status')
    return () => {
      return <span class={[ns.b(), ns.m(type.value)]}>{ctx.slots.default?.()}</span>
    }
  }
})
